The present invention relates generally to time stamping of waveform record edge in an acquired waveform input signal and more particularly to a method of time stamping a waveform record edge using a reference edge.
Oscilloscopes are traditional measurement instruments for time interval measurements of an electrical or optical signals, such as pulse width, time period and the like. A threshold level is established and the signal crossing points through the threshold are time stamped, such as by placing cursors at the crossing points. The time interval between the time stamped locations is calculated and displayed as the time interval measurement.
Digital oscilloscopes have essentially replaced traditional analog oscilloscopes for measuring electrical signals. A digital oscilloscope receives an input analog signal and samples the signal at a defined sample rate established by the instrument setting parameters. The sampled signal is quantized by an analog-to-digital converter to discrete levels and the digitized signal samples are stored in memory. A threshold level is established and time marks of the signal crossing points through the threshold are determined by interpolating between signal samples above and below the threshold crossing. The interpolated time marks are used to calculate the time interval between the time marks.
When interpolating a sampled edge for the purposes of determining a threshold crossing time, the simplest interpolation is a linear interpolation between a signal sample above and below the threshold crossing. However, the interpolated threshold crossing point is sensitive to noise, such as the digital oscilloscope sampling system noise. Sources of this sampling system noise include front end amplification or attenuation and discrete levels of the analog-to-digital converter, so called digitizing noise. Further, a fast rising or falling edge may span only a few sample time locations. In such circumstances, a higher order interpolation filter is a more appropriate. A higher order interpolation filter applies a filter function to multiple signal samples above and below the threshold crossing. A sin(x)/x interpolation filter is an example of such a higher order interpolation filter.
In a mathematical sense, interpolators are linear, shift-invariant systems. The system is linear if multiplication of the stimulus, or input function results in the same multiplication in the output function, and if the transform of two added input functions is the sum of the transforms of the two output functions taken independently. The system is shift-invariant if a shift in the input function results in a corresponding shift in the output function, while maintaining the shape and magnitude of the of the output function. If the input function or stimulus to the interpolator is a noisy edge, then the output of the interpolator will include that noise. Noise in the sampled signal manifests itself as amplitude variations in the signal. Establishing time stamps by interpolating the signal through a threshold crossing by either linear interpolation or a higher order interpolation filter are sensitive to these amplitude variations in the signal. The slope of the rising or falling edge (i.e. longer rise and fall times) in the presence of amplitude variations caused by noise further degrades the accuracy of the time stamp.
What is needed is a time stamping method for sampled edges of an input signal that is less sensitive to noise and edge rise and fall times than existing interpolation methods. The time stamping method needs to be flexible and robust to allow time stamping at various locations of an waveform edge. In addition, the time stamping method should provide greater time stamp accuracy than existing interpolation methods.
Accordingly, the present invention is a method of time stamping an edge of an input signal using a reference edge. The time stamping method generates a reference edge having time marked digital data values with at least a first defined time stamp in the reference edge. Digital data samples of the input signal are acquired to create a waveform record of the input signal. The digital data samples of a waveform record edge are compared to time equivalent digital data values of the reference edge to generate a error value representative of the difference between the waveform record edge and the reference edge. A time offset value is generated from the error value to vary the time location of the reference edge. The comparison and time offset generating steps are repeated to minimize the magnitude of the error value. The time offset value at the minimum error value is combined with a time location of nearest digital data sample of the waveform record edge to generate a waveform record edge time stamp.
The reference edge generating step may be implemented in a number of ways. One way is to over-sample and average the digital data samples of similar edges of the input signal, such as by equivalent time sampling and averaging. Another way is to store time marked digital data values representative of the reference edge. A further way is to store an algorithm representative of the reference edge and generate time marked digital data values using the reference edge algorithm. The reference edge generating step may be performed to generate both rising and falling reference edges.
The time stamp defining step allows the establishment of time stamps at various point in the reference edge. One of any number of additional time stamp defining steps includes, but not limited to, determining a 50% point in the reference edge. Alternative steps include determining first and second time stamps in the reference edge for performing rise and fall time measurements on the waveform record edge and establishing a 10% point and a 90% point in the reference edge for the first and second time stamps. In a waveform record edge containing noise artifacts, 20% and 80% points are established in the reference edge for the first and second time stamps.
The time offset value generating step may be implemented by summing error values of the error signal to generate an index value and applying the index value into a table of summed error values versus delta offset values to retrieve a delta offset value. The delta offset value is added to a current time offset value to generate a new time offset value that is applied to the digital data values of the reference edge to vary the time locations of the digital data values of the reference edge. The summation step, indexing step, addition step and applying the time offset value step are repeated for each new error signal for a predetermined number of iterations. The summation step, indexing step, addition step and applying the time offset value step may also be repeated until the delta offset value falls within a threshold region. The indexing step may also include the step of applying a scalar value to the error value.